package com.boot.mapper;

import com.boot.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

//@Mapper:让SpringBoot自动扫描识别到它
@Mapper
public interface UserMapper {

    List<User> list();

    List<User> listJoin();

    List<User> listOneToOneAndOneToMany();

    User getUserById(Long id);

    User getUserByIdOneToMany(Long id);

    List<User> getUserByUserNameAndPassword(@Param("userName") String userName, @Param("password") String password);

    List<User> getUserByUserNameAndPasswordOneToMany(@Param("userName") String userName, @Param("password") String password);

}
